import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus, { ElMessage } from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import './style.css'
import 'element-plus/dist/index.css'

const app = createApp(App)

app.config.errorHandler = function(err, _vm, info) {
  ElMessage.error({
    message: err as any,
    showClose: true,
  })
  console.error(err, info)
}

app.use(ElementPlus, { locale: zhCn })
app.mount('#app')
